#ifndef _LIB_STDIO_H_
#define _LIB_STDIO_H_

#include "stdint.h"

#define va_list char*

/**
 * @brief Print formatted data to standard output.
 *
 * @param format Pointer to the format string that specifies how subsequent
 * arguments are converted for output.
 * @param ... Additional arguments to be formatted and written to standard
 * output.
 *
 * @return The number of characters written to standard output.
 */
uint32_t printf(const char* restrict format, ...);

/**
 * @brief Write formatted data to buffer.
 *
 * @param buf Pointer to the destination buffer where the formatted data will be
 * written.
 * @param format Pointer to the format string that specifies how subsequent
 * arguments are converted for output.
 * @param ... Additional arguments to be formatted and written to the string.
 *
 * @return The number of characters written to the string.
 */
uint32_t sprintf(char* buf, const char* restrict format, ...);

/**
 * @brief Convert an integer value to a string representation with the specified
 * radix.
 *
 * @param value The integer value to be converted.
 * @param addr_of_buf_ptr_addr Pointer to a pointer to the output buffer where the result will be stored.
 * @param radix The radix (base) for the conversion, such as 10 for decimal.
 */
void itoa(uint32_t value, char** addr_of_buf_ptr_addr, uint8_t radix);

#endif // !_LIB_STDIO_H_
